module GYLite{
    export class ColorUtil{
        public static revertColor(color:number):number
		{
			let r:number,g:number,b:number,tintColor:number;            
			r = color >> 16;
			g = (color >> 8) & 0xff;
			b = color & 0xff;
			tintColor = (b << 16) + (g << 8) + r;
			return tintColor;
		}
		public static lerpColor(color:number,per:number):number
		{
			let r:number,g:number,b:number;
			r = color >> 16;
			g = (color >> 8) & 0xff;
			b = color & 0xff;
			r = r * per|0;
			g = g * per|0;
			b = b * per|0;
			return (r << 16)|(g<<8)|b;
		}
		public static getRGBColor(r:number,g:number,b:number):number
		{
			return (r << 16)|(g<<8)|b;
		}
		public static getARGBColor(r:number,g:number,b:number,a:number=1):number
		{
			return (a<<24)|(r << 16)|(g<<8)|b;
		}
    }
}